< previous page page_129 next page >

Page 129
Creating the Toolbar's Buttons
The next step in creating your toolbar is to create the buttons that will be placed on the toolbar. For this task, you move to the Buttons tab of the Property Pages (see Figure 6.15).
0129-01.jpg
Figure 6.15
You can assign images, captions, identifiers, and
even menus to toolbar buttons in the Buttons tab.
Adding a Standard Button to the Toolbar
To add a button to the toolbar, click Insert Button. If other buttons already exist on the toolbar, a new button appears after the currently selected button. For each button that you add, you should specify several propertiesthe Key property, the Style property, and the Image property.
The Key property specifies a string that is used to identify the button in code. You will see how it is used in the upcoming section "Enabling the Buttons with Code." The Key property for each button must be unique, and you should assign a string that is meaningful to you. This way, you can remember it more easily when you are writing your code.
The Image property specifies the index of the picture that you want to appear on the face of the button. The index corresponds to the index of the picture in the ImageList control. You can specify a value of zero for the Image property if you do not want a picture to appear on the button.
The Style property determines the type of button that you create. Table 6.4 summarizes the various settings of the Style property. Each of the button styles is shown in Figure 6.16.
Table 6.4 Style Property Settings That Control the Behavior of Toolbar Buttons
Setting ExampleVB ConstantDescription of Behavior
0- tbrDefaultThe button is a standard pushbutton.The Save Project button in Visual Basic

continues

 
< previous page page_129 next page >